import service from '@/utils/request';

export interface ListParams {
  title?: string;
  operName?: string;
  businessType?: string;
  status?: string;
  dateRange?: Array<string>;
  beginTime?: string;
  endTime?: string;
}

// 查询操作日志列表
export function getListData(params: ListParams) {
  return service.request({
    url: '/monitor/operlog/list',
    method: 'get',
    params,
  });
}

// 删除操作日志
export function delOperlog(operId: [string, number]) {
  return service.request({
    url: `/monitor/operlog/${operId}`,
    method: 'delete',
  });
}

// 清空操作日志
export function cleanOperlog() {
  return service.request({
    url: '/monitor/operlog/clean',
    method: 'delete',
  });
}
